<script setup>
import { ref } from 'vue'
import { articleChannelService } from '@/api/article'
defineProps({
  modelValue:{
    type: [String, Number],
    default: ''
  }
})
const channeList = ref([])
const getArticleChannel = async () => {
  const res = await articleChannelService()
  if(res.status === 200){
    channeList.value = res.data.data
  }
}
getArticleChannel()
const emit = defineEmits(['update:modelValue'])
</script>
<template>
<el-select  placeholder="请选择" :modelValue="modelValue" @update:modelValue="emit('update:modelValue', $event)">
  <el-option v-for="item in channeList" :key="item.id" :label="item.cate_name" :value="item.id"></el-option>
</el-select>
</template>
